package cn.wolfcode.shop.cloud.redis;


import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class SeckillKeyPrefix implements KeyPrefix{
    private int expireTime;
    private String keyPrefix;

    public SeckillKeyPrefix(int expireTime, String keyPrefix) {
        this.expireTime = expireTime;
        this.keyPrefix = keyPrefix;
    }

    public static  final SeckillKeyPrefix SECKILL_STOCK = new SeckillKeyPrefix(0,"seckill_stock_count:");
    public static  final SeckillKeyPrefix SECKILL_CREATE_ORDER = new SeckillKeyPrefix(0,"seckill_create_order:");
    public static  final SeckillKeyPrefix SECKILL_GOOD_HASH = new SeckillKeyPrefix(0,"seckill_good_hash");
    public static  final SeckillKeyPrefix SECKILL_PATH = new SeckillKeyPrefix(5,"seckill_path:");
    public static  final SeckillKeyPrefix SECKILL_VERIFY_CODE = new SeckillKeyPrefix(60,"seckill_verify_code:");
}

